package com.es.demo;

import java.util.ArrayList;

import com.es.util.db.Dao;
import com.es.util.page.PageBean;
import com.es.util.page.PageNavigator;

public class DemoBiz {

	public PageBean queryPageListDemo(PageNavigator pageNav, ArrayList param) throws Exception{
		Dao dao = new Dao();
		PageBean pageBean = new  PageBean();
		try {
			String sql = "SELECT * from menu  ORDER BY menu_id  asc";
			int total = dao.getAllRow(sql,param);		
			pageNav.setRowTotal(total);
			pageNav.setRowTotal(total/pageNav.getPageRow());
			pageBean = dao.queryPageList(sql, pageNav, param);
		} finally{
			dao.close();
		}
		return pageBean;
	}
}
